import request from '@/config/axios'
import { get } from 'axios'
import { pa } from 'element-plus/es/locale'

// 农场 VO
export interface FarmTourVO {
  id: number // ID
  name: string // 农场名称
}

// 农场管理 API
export const FarmTourApi = {
  // 获取农场列表
  getFarmTour: async () => {
    return await request.get({ 
      url: `farm/farm/list-all-simple` 
    })
  },
  // 获取天气
  getWeather: async (params: any) => {
    return await request.get({ 
      url: `farm/farm/getWeather`,
      params
    })
  },
  // 农舍监控
  getMonitorPage: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmHouseMonitorPage`,
      params
    })
  },
  // 告警以及设备运行状态
  getWarn: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmDeviceStatus`,
      params
    })
  },
  // 分选设备
  getSortDeviceApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmFXJOverview`,
      params
    })
  },
  // 装托机
  getZTJDeviceApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmZTJOverview`,
      params
    })
  },
  // 发酵
  getFJGDeviceApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getFarmFJGOverview`,
      params
    })
  },
  // 实时告警
  getNowWarnApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getDeviceAlarmNowByFarmId`,
      params
    })
  },
  // 获取产蛋数量
  getEggNumApi: async (params: any) => {
    return await request.get({ 
      url: `farm/house/getTodayEggByFarm`,
      params
    })
  },
}
